In [18]:
%matplotlib inline
In [19]:
# %load his.py
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable


plt.rc('font',size=30)


data=np.load('data.npz')


x=data['x']
y=data['y']


y=np.log10(y)


xed=np.linspace(x.min(),0.27,30)
yed=np.linspace(-1.5,3.5,30)



H, xedges, yedges = np.histogram2d(x, y, bins=(xed,yed))
H = H.T 


lst=['magma','brg','seismic','jet','hot','afmhot','gnuplot','gnuplot2','gist_ncar','nipy_spectral','gist_rainbow','inferno','viridis']

i=0
for ccc in lst:

	fig=plt.figure(i,figsize=(30,20))
	ax=fig.add_subplot(111)
	im=ax.imshow(H/H.max(axis=0),interpolation='bicubic', origin='low',extent=[xed[0],xed[-1],yed[0],yed[-1]],cmap=ccc,aspect='auto')
	divider = make_axes_locatable(ax)
	cax = divider.append_axes('right', size='5%', pad=0.05)

	ax.set_xlabel(r'$T_{PEAK}\ [GK]$',labelpad=20)
	ax.set_ylabel(r'$[O/H]$',labelpad=30)
	ax.set_title('Density plot (%s style)'%ccc,y=1.05)
	fig.colorbar(im, cax=cax, orientation='vertical')
	#plt.savefig('%s.png' %(ccc))
	
	i=i+1
In [20]:
len(lst)
Out[20]:
13
In [21]:
# %load 3d.py
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np


x = np.linspace(-10, 10, 100)
y = np.linspace(-10, 10, 100)
x, y = np.meshgrid(x, y)


z=np.exp(-(x**2+y**2)/5)


fig = plt.figure(figsize=(12,9))
ax = fig.gca(projection='3d')

surf = ax.plot_surface(x, y, z, color='green')

plt.show()
In [ ]: